package com.docmgmt.mvp.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 活动日志表
 * </p>
 *
 * @author Dora
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("collab_activity_log")
public class ActivityLogEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 日志ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 资源类型：file/folder
     */
    @TableField("resource_type")
    private String resourceType;

    /**
     * 资源ID
     */
    @TableField("resource_id")
    private Long resourceId;

    /**
     * 操作类型：upload/download/edit/delete/move/share/comment/permission
     */
    @TableField("action")
    private String action;

    /**
     * 操作人ID
     */
    @TableField("actor_id")
    private Long actorId;

    /**
     * 操作详情（JSON）
     */
    @TableField("details")
    private String details;

    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
}
